package cn.itcast.crm.service;

import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import cn.itcast.crm.domain.Customer;

public interface CustomerService {
	//查询所有未关联定区的客户
	@GET
	@Path("/noAssociationCustomers")
	@Produces({"application/xml","application/json"})
	public List<Customer> findNoAssociationCustomers();
	
	//查询已经关联定区的客户
	@GET
	@Path("/associationFixedAreaCustomers/{fixedAreaId}")
	@Produces({"application/xml","application/json"})
	//@Consumes({"application/xml","application/json"})
	public List<Customer> findHasAssociationFixedAreaCustomers(@PathParam("fixedAreaId") String fixedAreaId);
    
	
	//将客户关联到定区  客户id拼接
	@PUT
	@Path("/associationCustomersToFixedArea")
	//@Consumes({"application/xml","application/json"})
	public void associationCustomersToFixedArea(
			@QueryParam("customerIdStr") String customerIdStr,
			@QueryParam("fixedAreaId") String fixedAreaId);
	
	
	
	//注册的客户信息保存
	@Path("/customer")
	@POST
	@Consumes({"application/xml","application/json"})
	public void regist(Customer customer);
	
	//通过电话号码去查找客户
	@Path("/customer/telephone/{telephone}")
	@GET
	@Consumes({"application/xml","application/json"})
	//@Produces({"application/xml","application/json"})
	public Customer findCustomerByTelephone(@PathParam("telephone") String telephone);
	
	//修改用户的状态码
	@Path("/customer/updatetype/{telephone}")
	@GET
	public void updateType(@PathParam("telephone") String telephone);
	
	
}
